package com.nursinghome.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import com.nursinghome.converter.GoodsStatusEnumConverter;
import com.nursinghome.converter.GoodsTypeEnumConverter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Goods extends PageFilter<Goods> implements Serializable {
    private Integer id;
    @ExcelProperty("菜品名称")
    private String name;
    private String pic;
    @ExcelProperty(value = "菜品类型", converter = GoodsTypeEnumConverter.class)
    private Integer type;
    @ExcelProperty(value = "菜品数量")
    private Integer count;
    @ExcelProperty(value = "菜品标价")
    private BigDecimal price;
    @ExcelProperty(value = "真实价格")
    private BigDecimal realPrice;
    private Integer categoryId;
    private List<Integer> categoryIds;
    @ExcelProperty(value = "备注")
    private String description;
    private Double star;
    @ExcelProperty(value = "状态" , converter = GoodsStatusEnumConverter.class)
    private Integer status;
    private Integer isDelete;
    //如果category不为空，则说明是一对一映射，说明为货品分类
    private Category category;
    //如果category为空，则说明是一对多映射，说明为菜品分类
    private List<Category> categoryList;
}
